package com.example.thirdstage_project;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.thirdstage_project.entity.User;
import com.example.thirdstage_project.service.UserService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.List;

@SpringBootTest
class Kjsbtest {
    @Autowired
    private UserService service;

    @Test
    void contextLoads() {
        User user=new User();
        user.setGid(3);
        user.setUsername("zhangsan");
        user.setPassword("123456");
//        service.saveUsers(user);
    }

    @Test
    void testUserGetAll(){
//        List<User> all = service.getAllUsers();
//        System.out.println(all);
        IPage<User> page = service.getPage(1, 1);
        System.out.println(page);
    }

}


